//
//  XZSegmentBar.h
//  XZSegmentDemo
//
//  Created by Dreamer on 2018/1/28.
//  Copyright © 2018年 dreamer. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "XZSegmentConfig.h"

@protocol XZSegmentBarDelegate<NSObject>

- (void)segmentBarDidSelectIndex:(NSInteger)index;

@end


@interface XZSegmentBar : UIView

- (void)setUpSegmentTitleArr:(NSMutableArray<NSString *> *)titleArr configBlock:(void(^)(XZSegmentConfig *))configBlock;

@property (nonatomic, weak) id<XZSegmentBarDelegate> delegate;

@property (nonatomic, assign) NSInteger selectIndex;

- (void)updateSegmentBarItemWithScrollOffset:(CGFloat)scrollOffset;//当滑动存放界面的scrollview时，传入此时scrollview的contentOffset

@end
